package com.d0324;

import java.util.Arrays;

public class StudentSort {
    public static void main(String[] args) {
      Student s1=new Student("肖战",22,98);
      Student s2=new Student("王一博",25,94);
      Student s3=new Student("Bright",20,100);
      Student s4=new Student("Win",21,95);
      Student []stu=new Student[]{s1,s2,s3,s4};
        Arrays.sort(stu,new StudentAgeComeparetor());
        for (Student s:stu
             ) {
            System.out.println(s);
        }
    }
}
